<h2>Wszystkie artykuły</h2>
<?php echo $this->Paginator->prev('< Poprzednia', null, null, array('class' => 'disabled')); ?>
&nbsp;&nbsp;
<?php echo $this->Paginator->numbers(); ?>
&nbsp;&nbsp;
<?php echo $this->Paginator->next('Następna >', null, null, array('class' => 'disabled')); ?>
<?php

foreach($articles as $article) {
   $showLink = "/admin/articles/show/".$article['Article']['id'];
   $editLink = "/admin/articles/edit/".$article['Article']['id'];
   $deleteLink = "/admin/articles/delete/".$article['Article']['id'];
   
   echo("<h3>".$article['Article']['title']."</h3>");
   echo("<span class=\"article-info\">Autor: ".$article['User']['username'].", <a href=\"".$showLink."#comments\">Skomentuj (".count($article['ArticleComment']).") &raquo;</a></span>");
   echo("<p>".shorten("<!--more-->", $article['Article']['content'], "... <a href=\"".$showLink."\">Czytaj dalej...</a>", "")."</p>");
   echo("<p>".$this->Html->link("Pokaż", array('controller' => "articles", "action" => "show", $article['Article']['id'])));
   echo("&nbsp;&nbsp;".$this->Html->link("Edytuj", array('controller' => "articles", "action" => "edit", $article['Article']['id'])));
   echo("&nbsp;&nbsp;".$this->Html->link("Usuń", array('controller' => "articles", "action" => "delete", $article['Article']['id']), 
           array(), "Jesteś pewien, że chcesz usunąć ten artykuł?")."</p>");
   echo("<hr />");
}
?>
<?php echo $this->Paginator->prev('< Poprzednia', null, null, array('class' => 'disabled')); ?>
&nbsp;&nbsp;
<?php echo $this->Paginator->numbers(); ?>
&nbsp;&nbsp;
<?php echo $this->Paginator->next('Następna >', null, null, array('class' => 'disabled')); ?>